package com.jianggujin.modulelink.test;

import com.jianggujin.modulelink.action.JAction;
import com.jianggujin.modulelink.support.annotation.JIntercepts;
import com.jianggujin.modulelink.support.annotation.JSignature;
import com.jianggujin.modulelink.support.plugin.JAbstractInterceptor;
import com.jianggujin.modulelink.support.plugin.JInvocation;

@JIntercepts({ @JSignature(type = JAction.class, method = "execute", args = { Object.class }) })
public class GlobalInterceptor extends JAbstractInterceptor {
    @Override
    public Object intercept(JInvocation invocation) throws Throwable {
        System.out.println("全局插件开始工作");
        return invocation.proceed();
    }
}